//      https://www.nowcoder.com/practice/bd891093881d4ddf9e56e7cc8416562d


#include <iostream>
#include <string>
using namespace std;

string find(string s)
{
    string ans;
    int slow = 0;
    while (slow < s.size())
    {
        while (slow < s.size() && s[slow] < '0' || s[slow] > '9')
            slow++;
        int fast = slow + 1;
        int n = 1;
        while (s[fast] >= '0' && s[fast] <= '9')
        {
            n++;
            fast++;
        }
        if (ans.size() < n)
            ans = s.substr(slow, n);
        slow = fast;
    }
    return ans;
}

int main()
{
    string s;
    cin >> s;
    if (s.empty())
    {
        cout << "" << endl;
        return 0;
    }
    cout << find(s) << endl;

    return 0;
}